export default {
  // 设置
  changeLang(state, data) {
    state.lang = data
    localStorage.setItem('lang', data)
  },
  // 设置token
  changeVrToken(state, data) {
    state.vrToken = data
    sessionStorage.setItem('vrToken', data)
  },
  // 获取用户信息
  changeUserInfo(state, data) {
    state.userInfo = data
    state.layers = data.layers || []
  },
  // 设置上传头部
  changeHeaderToken(state, data) {
    state.headers = {
      'Authorization': 'Bearer ' + data
    }
  },

  // 是否显示登录
  isShowLogin(state, data) {
    state.isLogin = data
  },

  saveloginInfo(state, data) {
    // 存登录信息
    state.userInfo = data
  },

  // 是否显示cookies
  saveCookie(state,data) {
    state.saveCookies= data
  }
}